<template>
  <div class="tabber">
    <!-- <img src="" alt="" /> -->
    <span
      @click="dian(index)"
      :class="{ dainji: cIndex == index }"
      v-for="(item, index) in arr"
      :key="index"
      >{{ item }}</span
    >
  </div>
</template>

<script>
export default {
  data() {
    return {
      cIndex: "",
      arr: ["首页", "订单", "我的"],
    };
  },
  methods: {
    dian(index) {
      this.cIndex = index;
    },
  },
};
</script>

<style lang='scss' scoped>
.tabber {
  padding-top: 20px;
  box-sizing: border-box;
  width: 100%;
  height: 60px;
  background-color: white;
  position: fixed;
  bottom: 0;
  left: 0;
  display: flex;
  justify-content: space-around;
}

.tabber span {
  display: inline-block;
}

.dainji {
  color: lightskyblue;
}
</style>